package com.lrl.utils.qiniu;

import com.qiniu.storage.Region;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;



/**
 * 七牛云配置
 *
 * @author simon
 * @create 2018-08-15 10:44
 **/
@Configuration
@ConfigurationProperties(prefix = "qiniu")
@PropertySource("classpath:config/qiniu.properties")
@Component
public class QiNiuConfig {
    private static String accessKey;
    private static String secretKey;
    private static String bucket;
    private static Region region;
    private static String domainOfBucket;
    private static long expireInSeconds;

    public static String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        QiNiuConfig.accessKey = accessKey;
    }

    public static String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        QiNiuConfig.secretKey = secretKey;
    }

    public static String getBucket() {
        return bucket;
    }

    public void setBucket(String bucket) {
        QiNiuConfig.bucket = bucket;
    }

    public static Region getRegion() {
        return region;
    }

    public static void setRegion(Region region) {
        QiNiuConfig.region = region;
    }

    public static String getDomainOfBucket() {
        return domainOfBucket;
    }

    public void setDomainOfBucket(String domainOfBucket) {
        QiNiuConfig.domainOfBucket = domainOfBucket;
    }

    public static long getExpireInSeconds() {
        return expireInSeconds;
    }

    public void setExpireInSeconds(long expireInSeconds) {
        QiNiuConfig.expireInSeconds = expireInSeconds;
    }
}